package com.study.homework.concurrent;

public class MultiThreadShareData {
	public static void main(String[] args) {
		ShareData1 data1 = new ShareData1();
		new Thread(data1){}.start();
		new Thread(data1){}.start();
	}
}

class ShareData1 implements Runnable{
	private int j = 0;
	private int count = 100;
	public void increment(){
		j++;
	}
	
	public void decrement(){
		j--;
	}

	@Override
	public void run() {
		while(true){
			count--;
		}
	}
}
